public class example03 {
    public static void main(String[] args) throws IOException{
        File f1 = new File("D:\\file\\itheima.txt");
        if(f1.exists()){
            System.out.println("删除文件itheima.txt" + f1.delete());
        }else {
            System.out.println("创建文件itheima.txt" + f1.createNewFile());
        }
        File f2 = new File("D:\\file\\aaa");
        System.out.println("创建目录aaa：" + f2.mkdir());
        File f3 = new File("D:\\file\\aaa\\Hello.docx");
        if (f3.exists()){
            System.out.println("删除文件Hello.docx:" + f3.delete());
        }else {
            System.out.println("在目录aaa下创建文件Hello.docx:" + f3.createNewFile());
        }
    }
}
